﻿using System.ComponentModel.DataAnnotations;

namespace Md.Api.Model.Manage.SysDictData.Request;
/// <summary>
/// 通过字典编码更新系统字典数据请求实体
/// </summary>
public class RequestUpdateSysDictDataByDictCodeModel : RequestBaseModel
{
    /// <summary>
    /// 字典编码
    /// </summary>
    [Required(ErrorMessage = "字典编码不能为空")]
    public long DictCode { get; set; }
    /// <summary>
    /// 字典排序
    /// </summary>
    public int DictSort { get; set; }
    /// <summary>
    /// 字典标签
    /// </summary>
    [Required(ErrorMessage = "字典标签不能为空")]
    public string? DictLabel { get; set; }
    /// <summary>
    /// 字典键值
    /// </summary>
    [Required(ErrorMessage = "字典键值不能为空")]
    public string? DictValue { get; set; }
    /// <summary>
    /// 字典类型
    /// </summary>
    [Required(ErrorMessage = "字典类型不能为空")]
    public string? DictType { get; set; }
    /// <summary>
    /// 数据类型（0=文本、1=图片、2=音频、3=视频、4=json字符串）
    /// </summary>
    public string? DataType { get; set; }
    /// <summary>
    /// 样式属性（其他样式扩展）
    /// </summary>
    public string? CssClass { get; set; }
    /// <summary>
    /// 表格回显样式
    /// </summary>
    public string? ListClass { get; set; }
    /// <summary>
    /// 是否默认（Y是 N否）
    /// </summary>
    [Required(ErrorMessage = "字典数据默认项不能为空"), StringLength(1, ErrorMessage = "字典数据默认项长度为1")]
    public string? IsDefault { get; set; }
    /// <summary>
    /// 状态（0正常 1停用）
    /// </summary>
    [Required(ErrorMessage = "字典数据状态不能为空"), StringLength(1, ErrorMessage = "字典数据状态长度为1")]
    public string? Status { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
}
